package ar.edu.unsam.algo3.plantasvszombies.wicket.components

import org.apache.wicket.ajax.AjaxRequestTarget
import org.apache.wicket.ajax.form.OnChangeAjaxBehavior
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1

class XOnChangeAjaxBehavior extends OnChangeAjaxBehavior {
	Procedure1<AjaxRequestTarget> procedure;

	override protected onUpdate(AjaxRequestTarget target) {
		procedure.apply(target)
	}

	def setOnUpdate(Procedure1<AjaxRequestTarget> procedure) {
		this.procedure = procedure
	}
}
